from mgear.maya import pyqt
from mgear.vendor.Qt import QtCore, QtWidgets


class Ui_Form(object):

    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(832, 537)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.channelMapping_tableWidget = TableWidgetDragRowsChannelWrangler(Form)
        self.channelMapping_tableWidget.setDragDropMode(QtWidgets.QAbstractItemView.InternalMove)
        self.channelMapping_tableWidget.setDefaultDropAction(QtCore.Qt.MoveAction)
        self.channelMapping_tableWidget.setAlternatingRowColors(True)
        self.channelMapping_tableWidget.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.channelMapping_tableWidget.setCornerButtonEnabled(False)
        self.channelMapping_tableWidget.setObjectName("channelMapping_tableWidget")
        self.channelMapping_tableWidget.setColumnCount(5)
        self.channelMapping_tableWidget.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.channelMapping_tableWidget.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.channelMapping_tableWidget.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.channelMapping_tableWidget.setHorizontalHeaderItem(2, item)
        item = QtWidgets.QTableWidgetItem()
        self.channelMapping_tableWidget.setHorizontalHeaderItem(3, item)
        item = QtWidgets.QTableWidgetItem()
        self.channelMapping_tableWidget.setHorizontalHeaderItem(4, item)
        self.verticalLayout.addWidget(self.channelMapping_tableWidget)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.export_pushButton = QtWidgets.QPushButton(Form)
        self.export_pushButton.setObjectName("export_pushButton")
        self.horizontalLayout.addWidget(self.export_pushButton)
        self.import_pushButton = QtWidgets.QPushButton(Form)
        self.import_pushButton.setObjectName("import_pushButton")
        self.horizontalLayout.addWidget(self.import_pushButton)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.apply_pushButton = QtWidgets.QPushButton(Form)
        self.apply_pushButton.setObjectName("apply_pushButton")
        self.verticalLayout.addWidget(self.apply_pushButton)
        self.horizontalLayout_4.addLayout(self.verticalLayout)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.groupBox = QtWidgets.QGroupBox(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
        self.groupBox.setSizePolicy(sizePolicy)
        self.groupBox.setObjectName("groupBox")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.groupBox)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.channel_lineEdit = QtWidgets.QLineEdit(self.groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.channel_lineEdit.sizePolicy().hasHeightForWidth())
        self.channel_lineEdit.setSizePolicy(sizePolicy)
        self.channel_lineEdit.setObjectName("channel_lineEdit")
        self.horizontalLayout_2.addWidget(self.channel_lineEdit)
        self.channel_pushButton = QtWidgets.QPushButton(self.groupBox)
        self.channel_pushButton.setObjectName("channel_pushButton")
        self.horizontalLayout_2.addWidget(self.channel_pushButton)
        self.verticalLayout_2.addWidget(self.groupBox)
        self.groupBox_2 = QtWidgets.QGroupBox(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
        self.groupBox_2.setSizePolicy(sizePolicy)
        self.groupBox_2.setObjectName("groupBox_2")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.groupBox_2)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.target_lineEdit = QtWidgets.QLineEdit(self.groupBox_2)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.target_lineEdit.sizePolicy().hasHeightForWidth())
        self.target_lineEdit.setSizePolicy(sizePolicy)
        self.target_lineEdit.setObjectName("target_lineEdit")
        self.horizontalLayout_3.addWidget(self.target_lineEdit)
        self.target_pushButton = QtWidgets.QPushButton(self.groupBox_2)
        self.target_pushButton.setObjectName("target_pushButton")
        self.horizontalLayout_3.addWidget(self.target_pushButton)
        self.verticalLayout_2.addWidget(self.groupBox_2)
        self.setRow_pushButton = QtWidgets.QPushButton(Form)
        self.setRow_pushButton.setObjectName("setRow_pushButton")
        self.verticalLayout_2.addWidget(self.setRow_pushButton)
        self.line = QtWidgets.QFrame(Form)
        self.line.setFrameShadow(QtWidgets.QFrame.Plain)
        self.line.setLineWidth(2)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.verticalLayout_2.addWidget(self.line)
        self.setMultiChannel_pushButton = QtWidgets.QPushButton(Form)
        self.setMultiChannel_pushButton.setObjectName("setMultiChannel_pushButton")
        self.verticalLayout_2.addWidget(self.setMultiChannel_pushButton)
        self.setMultiTarget_pushButton = QtWidgets.QPushButton(Form)
        self.setMultiTarget_pushButton.setObjectName("setMultiTarget_pushButton")
        self.verticalLayout_2.addWidget(self.setMultiTarget_pushButton)
        self.line_2 = QtWidgets.QFrame(Form)
        self.line_2.setFrameShadow(QtWidgets.QFrame.Plain)
        self.line_2.setLineWidth(2)
        self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_2.setObjectName("line_2")
        self.verticalLayout_2.addWidget(self.line_2)
        self.clearSelectedRows_pushButton = QtWidgets.QPushButton(Form)
        self.clearSelectedRows_pushButton.setObjectName("clearSelectedRows_pushButton")
        self.verticalLayout_2.addWidget(self.clearSelectedRows_pushButton)
        self.clearAll_pushButton = QtWidgets.QPushButton(Form)
        self.clearAll_pushButton.setObjectName("clearAll_pushButton")
        self.verticalLayout_2.addWidget(self.clearAll_pushButton)
        self.line_4 = QtWidgets.QFrame(Form)
        self.line_4.setFrameShadow(QtWidgets.QFrame.Plain)
        self.line_4.setLineWidth(2)
        self.line_4.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_4.setObjectName("line_4")
        self.verticalLayout_2.addWidget(self.line_4)
        self.setMoveOp_pushButton = QtWidgets.QPushButton(Form)
        self.setMoveOp_pushButton.setObjectName("setMoveOp_pushButton")
        self.verticalLayout_2.addWidget(self.setMoveOp_pushButton)
        self.setProxyOp_pushButton = QtWidgets.QPushButton(Form)
        self.setProxyOp_pushButton.setObjectName("setProxyOp_pushButton")
        self.verticalLayout_2.addWidget(self.setProxyOp_pushButton)
        self.line_5 = QtWidgets.QFrame(Form)
        self.line_5.setFrameShadow(QtWidgets.QFrame.Plain)
        self.line_5.setLineWidth(2)
        self.line_5.setFrameShape(QtWidgets.QFrame.HLine)
        self.line_5.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_5.setObjectName("line_5")
        self.verticalLayout_2.addWidget(self.line_5)
        self.groupBox_3 = QtWidgets.QGroupBox(Form)
        self.groupBox_3.setObjectName("groupBox_3")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_3)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.movePolicy_comboBox = QtWidgets.QComboBox(self.groupBox_3)
        self.movePolicy_comboBox.setObjectName("movePolicy_comboBox")
        self.movePolicy_comboBox.addItem("")
        self.movePolicy_comboBox.addItem("")
        self.movePolicy_comboBox.addItem("")
        self.gridLayout_2.addWidget(self.movePolicy_comboBox, 0, 0, 1, 1)
        self.verticalLayout_2.addWidget(self.groupBox_3)
        self.groupBox_4 = QtWidgets.QGroupBox(Form)
        self.groupBox_4.setObjectName("groupBox_4")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox_4)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.proxyPolicy_comboBox = QtWidgets.QComboBox(self.groupBox_4)
        self.proxyPolicy_comboBox.setObjectName("proxyPolicy_comboBox")
        self.proxyPolicy_comboBox.addItem("")
        self.proxyPolicy_comboBox.addItem("")
        self.gridLayout_3.addWidget(self.proxyPolicy_comboBox, 0, 0, 1, 1)
        self.verticalLayout_2.addWidget(self.groupBox_4)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem)
        self.horizontalLayout_4.addLayout(self.verticalLayout_2)
        self.gridLayout.addLayout(self.horizontalLayout_4, 0, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        Form.setWindowTitle(pyqt.fakeTranslate("Form", "Form", None, -1))
        self.channelMapping_tableWidget.setSortingEnabled(False)
        self.channelMapping_tableWidget.horizontalHeaderItem(0).setText(pyqt.fakeTranslate("Form", "Idx", None, -1))
        self.channelMapping_tableWidget.horizontalHeaderItem(1).setText(pyqt.fakeTranslate("Form", "Channel", None, -1))
        self.channelMapping_tableWidget.horizontalHeaderItem(2).setText(pyqt.fakeTranslate("Form", "Source", None, -1))
        self.channelMapping_tableWidget.horizontalHeaderItem(3).setText(pyqt.fakeTranslate("Form", "Target", None, -1))
        self.channelMapping_tableWidget.horizontalHeaderItem(4).setText(pyqt.fakeTranslate("Form", "operation", None, -1))
        self.export_pushButton.setText(pyqt.fakeTranslate("Form", "Export", None, -1))
        self.import_pushButton.setText(pyqt.fakeTranslate("Form", "Import", None, -1))
        self.apply_pushButton.setText(pyqt.fakeTranslate("Form", "Apply", None, -1))
        self.groupBox.setTitle(pyqt.fakeTranslate("Form", "Channel", None, -1))
        self.channel_pushButton.setText(pyqt.fakeTranslate("Form", "<<<", None, -1))
        self.groupBox_2.setTitle(pyqt.fakeTranslate("Form", "Target", None, -1))
        self.target_pushButton.setText(pyqt.fakeTranslate("Form", "<<<", None, -1))
        self.setRow_pushButton.setText(pyqt.fakeTranslate("Form", "Set Row", None, -1))
        self.setMultiChannel_pushButton.setText(pyqt.fakeTranslate("Form", "Set Multi Channel", None, -1))
        self.setMultiTarget_pushButton.setText(pyqt.fakeTranslate("Form", "Set Multi Target", None, -1))
        self.clearSelectedRows_pushButton.setText(pyqt.fakeTranslate("Form", "Clear Selected Rows", None, -1))
        self.clearAll_pushButton.setText(pyqt.fakeTranslate("Form", "Clear All", None, -1))
        self.setMoveOp_pushButton.setText(pyqt.fakeTranslate("Form", "Set Move Operation", None, -1))
        self.setProxyOp_pushButton.setText(pyqt.fakeTranslate("Form", "Set Proxy Operation", None, -1))
        self.groupBox_3.setTitle(pyqt.fakeTranslate("Form", "Move Duplicated Channel Policy", None, -1))
        self.movePolicy_comboBox.setToolTip(pyqt.fakeTranslate("Form", "<html><head/><body><p>Set the duplicate channel policy when we use proxy channel operation.</p><p>-<span style=\" font-weight:600;\">Merge</span>: If the channel is already in the target object the new channel creationg will be skipped and the output channels will be reconnected to the previous existing channel</p><p>-<span style=\" font-weight:600;\">Index</span>: If the channel is already in the target object, the new proxy channel will add an index number to avoid the name clashing.</p><p><span style=\" text-decoration: underline;\">example:</span></p><p align=\"center\"><span style=\" font-style:italic;\">&quot;ik_fk_blend&quot; will be renamed &quot;ik_fk_blend0&quot;, &quot;ik_fk_blend1&quot;,&quot;ik_fk_blend2&quot;, etc...</span></p><p>-<span style=\" font-weight:600;\">Full Name</span>: If the channel is already in the target object, the new channel will be renamed using the source node name as a prefix</p></body></html>", None, -1))
        self.movePolicy_comboBox.setItemText(0, pyqt.fakeTranslate("Form", "Merge", None, -1))
        self.movePolicy_comboBox.setItemText(1, pyqt.fakeTranslate("Form", "Index", None, -1))
        self.movePolicy_comboBox.setItemText(2, pyqt.fakeTranslate("Form", "Full Name", None, -1))
        self.groupBox_4.setTitle(pyqt.fakeTranslate("Form", "Proxy Duplicated Channel Policy", None, -1))
        self.proxyPolicy_comboBox.setToolTip(pyqt.fakeTranslate("Form", "<html><head/><body><p>Set the duplicate channel policy when we use proxy channel operation.</p><p>-<span style=\" font-weight:600;\">Index</span>: If the channel is already in the target object, the new proxy channel will add an index number to avoid the name clashing.</p><p><span style=\" text-decoration: underline;\">example:</span></p><p align=\"center\"><span style=\" font-style:italic;\">&quot;ik_fk_blend&quot; will be renamed &quot;ik_fk_blend0&quot;, &quot;ik_fk_blend1&quot;,&quot;ik_fk_blend2&quot;, etc...</span></p><p>-<span style=\" font-weight:600;\">Full Name</span>: If the channel is already in the target object, the new channel will be renamed using the source node name as a prefix</p></body></html>", None, -1))
        self.proxyPolicy_comboBox.setItemText(0, pyqt.fakeTranslate("Form", "Index", None, -1))
        self.proxyPolicy_comboBox.setItemText(1, pyqt.fakeTranslate("Form", "Full Name", None, -1))

from mgear.maya.rigbits.widgets import TableWidgetDragRowsChannelWrangler
